Get Customer Campaigns
The Get Customer Campaigns API is used to retrieve a list of all campaigns which are connected to the customer.
| HTTP URL | |
|---|---|
| GET | api/v2/customer/{id}/campaign/{id} |
If campaign {id} is not provided, retrieve all campaigns for the customer.
For paging support, see section .
Eligibility
The Requestor is eligible to request and receive a list of any campaign information which was marked as connected to its customer.
API Request
Request Structure
This API has no request structure.
API Response
Response Structure
| Parameter | Type | M/O/CM | Description |
|---|---|---|---|
| Parameter | Type | M/O/CM | Description |
| errorCode | String | O | Failure code. |
| errorMessage | String | O | Failure message. |
| content | Object | O | Array of main response body object displayed when an API call was successful. For a failure, it will be empty. |
| pageable | Object | O | Paging information object displayed when an API call was successful. For a failure, it will be empty. |
Content Data Objects
| Element | Type | M/O/CM | Description |
|---|---|---|---|
| id | Numeric | M | Campaign unique identifier |
| name | String | M | Campaign name |
| description | String | O | Campaign description |
| templateId | Numeric | M | Campaign template unique identifier |
| status | String | M | Campaign status. ENUM: CREATED, PROCESS, SCHEDULED, SUSPEND, CANCELED, COMPLETED, EXCEPTION, EXPIRED |
| timestamp | dateTime | M | Campaign creation timestamp |
| effectiveStart | String | M | Campaign effective duration start time |
| effectiveEnd | String | M | Campaign effective duration end time |
| maxRetries | Numeric | M | Maximum number of retries |
Pageable Data Objects
| Parameter | Type | M/O/CM | Description |
|---|---|---|---|
| page | Numeric | M | Page number |
| size | Numeric | M | Page size. Number of requested elements per page |
| totalPages | Numeric | M | Total amount of available pages per requested page size |
| totalElements | Numeric | M | Total amount of retrieved elements |
Error Codes
In addition to the general success and failure codes, the following error codes are possible.
| Code | Message |
|---|---|
| GLOBAL_1001 | Service unavailable. Please try again |
| CUSTOMER_1002 | Customer does not exist |
| CUSTOMER_1037 | Campaign does not exist |
Examples
Request Body
Copy
{
}
Response Body: Success ACK
Copy
{
"errorCode": "",
"errorMessage": "",
"content": [
{
"id": 67,
"name": "test https key write bap 1 from resume",
"description": "",
"templateId": 20,
"status": "COMPLETED",
"timestamp": "2022-08-22 14:13:59",
"effectiveStart": "2022-08-22 13:08:59",
"effectiveEnd": "2022-08-23 13:08:59",
"maxRetries": 3
},
{
"id": 524,
"name": "Add TIS IMSI",
"description": "",
"templateId": 21,
"status": "CREATED",
"timestamp": "2023-04-28 06:34:03",
"effectiveStart": "2022-08-22 08:57:14",
"effectiveEnd": "2022-08-23 08:57:14",
"maxRetries": 3
}
],
"pageable": {
"page": 1,
"size": 10,
"totalPages": 99,
"totalElements": 988
}
}
Response Body: Failure NAK
Copy
{
"errorCode": "CUSTOMER_1037",
"errorMessage": "Campaign does not exist",
"content": "",
"pageable": ""
}